// 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
import 'core-js/stable'
import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 请求库
import axios from './api/axios'
Vue.prototype.$axios = axios

// 设置 js中可以访问 $cdn
import { $cdn } from '@/config'
Vue.prototype.$cdn = $cdn

// 全局引入按需引入UI库 vant
import '@/plugins/vant'
// 引入全局样式
import '@/assets/css/index.scss'
// 移动端适配
import 'lib-flexible/flexible.js'

import '@/plugins/registerSvgIcon'
import '@/plugins/registerCom'

// filters
import './filters'
Vue.config.productionTip = false

import dayjs from 'dayjs'
import 'dayjs/locale/es' // load on demand
dayjs.locale('es')
Vue.prototype.dayjs = dayjs
Vue.use(dayjs)
// 引入vue-amap
import VueAMap from 'vue-amap'

Vue.use(VueAMap)

VueAMap.initAMapApiLoader({
  key: '5cb232beffe42e35c66a2fcdc05092ef',
  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.Geocoder', 'AMap.AMapManager', 'AMap.MouseTool', 'AMap.DistrictSearch','AMap.CitySearch','AMap.Geolocation'],
  uiVersion: '1.0.11', // 版本号
  v: '1.4.14'
})
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
